<?php
include_once("connexion.php");


$query =" SELECT * FROM Type ";
$resultat = mysqli_query($connexion, $query);

if( isset($_POST["valider"])){
	$nom = $_POST["nom"];
	$prenom = $_POST["prenom"];
	$email = $_POST["email"];
	$pwd = $_POST["pwd"];
	$pwd2 = $_POST["pwd2"];
	$type = $_POST["type"];
	
	if($pwd == $pwd2 && $type != "0"){
		//Enregistrement en BDD
		$query ="INSERT INTO User VALUES ('','".$nom."','".$prenom."','".$email."','".$pwd."',".$type.")";
		$res = mysqli_query($connexion, $query);
	}
}


include ("ajout.html");



?>









